<script type="text/javascript" language="JavaScript1.2">
	function quickpopdate(sFormName, sFieldName) {
		var nHandle, dDate=new Date(), nCurrDate=dDate.getDate(), nCurrYear,
		sColAppBody, sColAppTitle, nForCnt, nCurrMonth,
		sSelected0="", sSelected1="", sSelected2="", sSelected3="", sSelected4="",
		sSelected5="", sSelected6="", sSelected7="", sSelected8="", sSelected9="",
		sSelected10="", sSelected11="", nInnCnt
	
		
		<CFOUTPUT>
		<CFIF IsDefined("client.color_appbody")>
			sColAppBody="#client.color_appbody#"
			sColAppTitle="#client.color_apptitle#"
			sColAppbg="#client.color_tblhead#"
		<CFELSE>
			sColAppBody="#site_centerbodycolor#"
			sColAppTitle="#site_lefthead#"
			sColAppbg="#client.color_tblhead#"
		</CFIF>
		</CFOUTPUT>
		
	
	
		nHandle=window.open("ibosetmp.html", "CalendarWindow", "width=240,height=220")
	
		// Get the first day of the month
		dDate.setDate(1)
	
		// Select the current month
		nCurrYear=dDate.getFullYear()
		nCurrMonth=dDate.getMonth()
		if (nCurrMonth == 0) {
			sSelected0="selected"
		} else if (nCurrMonth == 1) {
			sSelected1="selected"
		} else if (nCurrMonth == 2) {
			sSelected2="selected"
		} else if (nCurrMonth == 3) {
			sSelected3="selected"
		} else if (nCurrMonth == 4) {
			sSelected4="selected"
		} else if (nCurrMonth == 5) {
			sSelected5="selected"
		} else if (nCurrMonth == 6) {
			sSelected6="selected"
		} else if (nCurrMonth == 7) {
			sSelected7="selected"
		} else if (nCurrMonth == 8) {
			sSelected8="selected"
		} else if (nCurrMonth == 9) {
			sSelected9="selected"
		} else if (nCurrMonth == 10) {
			sSelected10="selected"
		} else if (nCurrMonth == 11) {
			sSelected11="selected"
		}
	
		// Open stream
		nHandle.document.open()
	
		// Write HTML content
		nHandle.document.writeln(
		"<html>\n" +
		"<head>\n<title>iBOS/e Calendar</title>\n" +
		"<" + "script language='JavaScript1.3'" + ">\n" +
		"var lGlobal=true;\n" +
		"function checkenter() {\n" +
		"	if(event.keyCode==13)\n" +
		"		ChangeDate(3);\n" +
		"}\n\n" +
		"function putcurrentdate2formfield() {\n" +
		"var dDate=new Date(), nDate=dDate.getDate(), nMonth=dDate.getMonth() + 1, nYear=dDate.getFullYear(), sDateSelected;\n" +
		"	sDateSelected=((nMonth.toString().length == 1) ? '0' : '') + nMonth + '/' + ((nDate.toString().length == 1) ? '0' : '') + nDate + '/' + nYear;\n" +
		"	eval(\"self.opener.document." + sFormName + "." + sFieldName + "\").value=sDateSelected;\n" +
		"	eval(\"self.opener.document." + sFormName + "." + sFieldName + "\").focus();\n" +
		"	window.close();\n" +
		"}\n\n" +
		"function putdate2formfield(nDate) {\n" +
		"var sDateSelected=document.frmDate.selmonth.value + '/' + ((nDate.toString().length == 1) ? '0' : '') + nDate + '/' + document.frmDate.inpyear.value;\n" +
		"	eval(\"self.opener.document." + sFormName + "." + sFieldName + "\").value=sDateSelected;\n" +
		"	eval(\"self.opener.document." + sFormName + "." + sFieldName + "\").focus();\n" +
		"	window.close();\n" +
		"}\n\n" +
		"function ChangeDate(nMove) {\n" +
		"var dDate=new Date(), nFirstDay, dCurrDate=Date(), nInnCnt, lSameMY=false,\n" +
		"	nForCnt, nLastDate=28, nIncDay=1, dDate2Day=new Date(),dTempDate,\n" +
		"	sColAppBody, sColAppTitle, lLast;\n" +
		"	if (lGlobal) {\n" +
		"		lGlobal=false;\n" +
		"		document.onkeydown=new Function('checkenter()');\n" +
		"	}\n\n" +
		"	sColAppBody='" + sColAppBody + "';\n" +
		"	sColAppTitle='" + sColAppTitle + "';\n" +
		"	dDate.setDate(1);\n" +
		"	if (nMove != 0) {\n" +
		"		dDate.setMonth(parseInt(document.frmDate.selmonth.value) - 1);\n" +
		"		dDate.setYear(document.frmDate.inpyear.value);\n" +
		"	}\n\n" +
		"	if (nMove == 1) {\n" +
		"		if (dDate.getMonth() == 0) {\n" +
		"			dDate.setYear(dDate.getFullYear() - 1);\n" +
		"			dDate.setMonth(11);\n" +
		"		} else {\n" +
		"			dDate.setMonth(dDate.getMonth() - 1);\n" +
		"		}\n" +
		"	} else {\n" +
		"		if (nMove == 2) {\n" +
		"			if (dDate.getMonth() == 11) {\n" +
		"				dDate.setYear(dDate.getFullYear() + 1);\n" +
		"				dDate.setMonth(0);\n" +
		"			} else {\n" +
		"				dDate.setMonth(dDate.getMonth() + 1);\n" +
		"			}\n" +
		"		}\n" +
		"	}\n" +
		"	if (nMove != 0) {\n" +
		"		document.frmDate.selmonth.selectedIndex=dDate.getMonth();\n" +
		"		document.frmDate.inpyear.value=dDate.getFullYear().toString();\n" +
		"	}\n\n" +
		"	nFirstDay=dDate.getDay();\n" +
		"	dTempDate=new Date(dDate.toString());\n" +
		"	while (nLastDate == 28 || nLastDate == dTempDate.getDate()) {\n" +
		"		nLastDate++;\n" +
		"		dTempDate.setDate(nLastDate);\n" +
		"	}\n" +
		"	nLastDate--;\n" +
		"	lLast=false;\n\n" +
		"	if (dDate2Day.getMonth() == dDate.getMonth() && dDate2Day.getFullYear() == dDate.getFullYear()) {\n" +
		"		lSameMY=true;" +
		"	}\n\n" +
		"	for (nInnCnt=0; nInnCnt < 6; nInnCnt++) {\n" +
		"		for (nForCnt=0; nForCnt < 7; nForCnt++) {\n" +
		"			if (lLast) {\n" +
		"				eval(\"document.all.x\" + nInnCnt + \"y\" + nForCnt).style.display='none';\n" +
		"				eval(\"document.all.xx\" + nInnCnt + \"yy\" + nForCnt).bgColor='#FFFFFF';\n" +
		"			} else {\n" +
		"				eval(\"document.all.xx\" + nInnCnt + \"yy\" + nForCnt).bgColor=(lSameMY && dDate2Day.getDate() == nIncDay && nForCnt >= nFirstDay) ? sColAppTitle : sColAppBody;\n" +
		"				if ( (nIncDay > nLastDate) ||\n" +
		"					 (nIncDay == 1 && nForCnt < nFirstDay) ) {\n" +
		"					eval(\"document.all.x\" + nInnCnt + \"y\" + nForCnt).innerHTML='<table cellspacing=0 cellpadding=0><tr><td bgcolor=\"' + sColAppBody + '\"><a style=\"color:#ed1e14; font-family:arial,helvetica,sans-serif; font-size:11px; font-weight:bold; text-decoration:none;\">&nbsp;</a></td></tr></table>';\n" +
		"					eval(\"document.all.x\" + nInnCnt + \"y\" + nForCnt).style.display='block';\n" +
		"				} else {\n" +
		"					eval(\"document.all.x\" + nInnCnt + \"y\" + nForCnt).innerHTML='<table><tr><td bgcolor=\"' + ((lSameMY && dDate2Day.getDate() == nIncDay) ? sColAppTitle : sColAppBody) + '\"><a href=\"javascript: putdate2formfield(' + nIncDay + ')\" style=\"color:#ed1e14; font-family:arial,helvetica,sans-serif; font-size:11px; font-weight:bold;\">' + nIncDay + '</a></td></tr></table>';\n" +
		"					eval(\"document.all.x\" + nInnCnt + \"y\" + nForCnt).style.display='block';\n" +
		"					nIncDay++;\n" +
		"				}\n" +
		"			}\n" +
		"		}\n" +
		"		if (nIncDay > nLastDate) {\n" +
		"			lLast=true;" +
		"		}\n" +
		"	}\n" +
		"}\n\n" +
		"function CheckDigit(sValidKey, oInput, lExceptKey) {\n" +
		"var sFld_Value=oInput.value, sKey=sFld_Value.charAt(sFld_Value.length - 1),\n" +
		"	lExpr=(sValidKey.indexOf(sKey) == -1);\n" +
		"	lExpr=(lExceptKey) ? (!lExpr) : (lExpr);\n" +
		"	if (lExpr) {\n" +
		"		sFld_Value=sFld_Value.substring(0,sFld_Value.length - 1);\n" +
		"		oInput.value=sFld_Value;\n" +
		"	}\n" +
		"}\n" +
		"<" + "/script" + ">\n" +
		"</head>\n" +
		"<body bgcolor='#FFFFFF' topmargin=0 bottommargin=0 leftmargin=0 rightmargin=0 onload='ChangeDate(0)'>\n" +
		"<form name='frmDate' action='' method='post' onsubmit='return(false);'>\n" +
		"<table cellspacing=4 cellpadding=0 align='center'>\n" +
		"<tr>\n" +
		"	<td colspan='7' align='center'><a href='javascript: ChangeDate(1)' style='color:#ed1e14; font-family:arial,helvetica,sans-serif; font-size:13px; font-weight:bold;'>&lt;&lt;</a>&nbsp;&nbsp;\n" +
		"		<select name='selmonth' onchange='ChangeDate(3)' style='font-family:arial,sans-serif; font-size:14px; font-weight:bold;'>\n" +
		"		<option value='1'" + sSelected0 + ">January</option>\n" +
		"		<option value='2'" + sSelected1 + ">February</option>\n" +
		"		<option value='3'" + sSelected2 + ">March</option>\n" +
		"		<option value='4'" + sSelected3 + ">April</option>\n" +
		"		<option value='5'" + sSelected4 + ">May</option>\n" +
		"		<option value='6'" + sSelected5 + ">June</option>\n" +
		"		<option value='7'" + sSelected6 + ">July</option>\n" +
		"		<option value='8'" + sSelected7 + ">August</option>\n" +
		"		<option value='9'" + sSelected8 + ">September</option>\n" +
		"		<option value='10'" + sSelected9 + ">October</option>\n" +
		"		<option value='11'" + sSelected10 + ">November</option>\n" +
		"		<option value='12'" + sSelected11 + ">December</option>\n" +
		"		</select>\n" +
			"	<input type='text' onkeyup='CheckDigit(\"0123456789\", this)' onblur='ChangeDate(3)' style='font-family:arial,sans-serif; font-size:14px; font-weight:bold;' name='inpyear' value='" + nCurrYear + "' size=4 maxlength=4>&nbsp;&nbsp;\n" +
		"		<a href='javascript: ChangeDate(2)' style='color:#ed1e14; font-family:arial,helvetica,sans-serif; font-size:13px; font-weight:bold;'>&gt;&gt;</a>\n" +
		"	</td>\n" +
		"</tr>\n" +
		"<tr>\n" +
		"	<td align='center' bgcolor='" + sColAppTitle + "' style='color:#FFFFFF; font:11px arial,helvetica,sans-serif; font-weight:bold'>Sun</td>\n" +
		"	<td align='center' bgcolor='" + sColAppTitle + "' style='color:#FFFFFF; font:11px arial,helvetica,sans-serif; font-weight:bold'>Mon</td>\n" +
		"	<td align='center' bgcolor='" + sColAppTitle + "' style='color:#FFFFFF; font:11px arial,helvetica,sans-serif; font-weight:bold'>Tue</td>\n" +
		"	<td align='center' bgcolor='" + sColAppTitle + "' style='color:#FFFFFF; font:11px arial,helvetica,sans-serif; font-weight:bold'>Wed</td>\n" +
		"	<td align='center' bgcolor='" + sColAppTitle + "' style='color:#FFFFFF; font:11px arial,helvetica,sans-serif; font-weight:bold'>Thu</td>\n" +
		"	<td align='center' bgcolor='" + sColAppTitle + "' style='color:#FFFFFF; font:11px arial,helvetica,sans-serif; font-weight:bold'>Fri</td>\n" +
		"	<td align='center' bgcolor='" + sColAppTitle + "' style='color:#FFFFFF; font:11px arial,helvetica,sans-serif; font-weight:bold'>Sat</td>\n" +
		"</tr>\n")
	
		for (nInnCnt=0; nInnCnt < 6; nInnCnt++) {
			nHandle.document.writeln("<tr>")
			for (nForCnt=0; nForCnt < 7; nForCnt++) {
				nHandle.document.writeln("<td  align='center' id='xx" + nInnCnt + "yy" + nForCnt + "'><div id='x" + nInnCnt + "y" + nForCnt + "'></div></td>")
			}
			nHandle.document.writeln("</tr>")
		}
	
		nHandle.document.writeln("<tr>\n" +
							"<td colspan='7' align='center'><a href='javascript: putcurrentdate2formfield()' style='color:#ed1e14; font-family:arial,helvetica,sans-serif; font-size:13px; font-weight:bold;'>today</a>&nbsp;&nbsp;&nbsp;<a href='javascript:window.close()' style='color:#ed1e14; font-family:arial,helvetica,sans-serif; font-size:13px; font-weight:bold;'>close</a></td>\n" +
							"</tr>\n" +
							"</form>\n" +
							"</table>\n" +
							"</body>\n" +
							"</html>\n")
		// Close stream
		nHandle.document.close()
	}
</script>